package vn.edu.uit.chemistry.view;

import vn.edu.uit.chemistry.R;
import android.content.Context;
import android.view.LayoutInflater;
import android.widget.ProgressBar;
import android.widget.TextView;

public class ViewRowNopBaiCu extends AbstractView {

	public TextView tvHoten;
	public ProgressBar prPercent;
	public TextView tvPercent;

	public ViewRowNopBaiCu(Context context) {
		super(context);
		pContext = context;
		mInflater = LayoutInflater.from(pContext);
		layout = mInflater.inflate(R.layout.row_nop_bai_cu, null);
		
		tvHoten = (TextView) layout.findViewById(R.id.tvHoTen);
		prPercent = (ProgressBar) layout.findViewById(R.id.progPercent);
		tvPercent = (TextView) layout.findViewById(R.id.tvPercent);
	}

	public void setContent(String hoten, int percent) {
		tvHoten.setText(hoten);
		prPercent.setProgress(percent);
		tvPercent.setText("" + percent + " %");
	}
}
